# response_callbacks = {}
# unique_id = 10

 # 环境设置
_env = 
    debug: _debug,
    env: "ios", #android java ios web
    pid: _pid,
    lang: _lang

log = if _debug then () -> __log.apply this,arguments else ()->

# FunctionSerialization = (func)-> 
#     function_id = 'javascript_function_' + (unique_id++) + '_' + new Date().getTime()
#     response_callbacks[function_id] = func
#     function_id

# JavaScriptFunction = ()->
#     jsFuncId = arguments[arguments.length-1]
#     jsFunc =  if typeof response_callbacks[jsFuncId] != "undefined" then response_callbacks[jsFuncId] else eval ""+jsFuncId
#     if typeof jsFunc == "function" then jsFunc.apply @,arguments else null

#####################################################################################################
@_env = _env;
# @__JavaScriptFunction = JavaScriptFunction
# @FunctionSerialization = (func)->
#     __SerializedFunction = {}
#     __SerializedFunction[__functionScript] = FunctionSerialization func
#     __SerializedFunction[__contextScript] = _env.pid
#     __SerializedFunction

@console = log: log